package com.jmz.apt.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by fanglexue on 2019/10/25.
 */
@Getter
@AllArgsConstructor
public enum ResponseCode {


    SUCCESS("10001","请求成功"),
    ERROR("50000","请求失败"),
    ILLEGAL_ARGUMENTS("50001","请求参数不合法"),
    LOSE_ARGUMENTS("50002","请求参数不合法"),

    //身份认证模块
    AUTHENTICATION_FAILURE("40001","用户认证失败"),
    LOGIN_SUCCESS("10001","登录成功"),
    LOGIN_FAILURE("40002","账号或密码不存在"),
    NO_LOGIN("40003","用户未登录"),
    LOGIN_LOSE_EFFICACY("40004","用户登录状态已失效,请重新登陆!"),
    LOGIN_EXCEPTION("40005","账户异常!"),
    GET_UINFO_FAILURE("40006","获取用户信息失败"),
    NO_PERMISSION("40007","无权访问资源"),
    REFRESH_TOKEN("40008",""),

    //数据库操作异常
    DB_OPERATION_ERROR("60001","数据库操作异常"),
    DB_LOSE_PARM("60002","缺失必要参数");

    private final String code;
    private final String desc;


}
